package com.food.eat;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @Author:RenPu
 * @Date: 2020/7/18 16:47
 * @Version: 1.0
 * @description:
 */

@Slf4j
//exclude排出spring session默认的登录页面
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
@MapperScan(value = {"com.food.eat.mapper"})

//扫描所有包，以及相关的组件包
@ComponentScan(basePackages = {"com.food.eat", "org.n3r.idworker"})

//开启spring session的注解
@EnableRedisHttpSession
public class ApiMainApplication {

    //C:\Users\12795\AppData\Local\Temp\hsperfdata_12795

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(ApiMainApplication.class, args);
//        run.getBean();
//        run.refresh();
        log.info(" =========》SYSTEM START SUCCESSFULLY ===========》");
    }


}
